package cn.circle.mobile.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import cn.circle.commom.dao.impl.BaseDaoImpl;
import cn.circle.mobile.model.WeChatUser;

/**
 * 前端基础控制器
 * 
 * @author 
 * @Date 
 */
@Controller
@EnableWebMvc
public class FrontBaseController extends BaseDaoImpl {

	private static final Log log = LogFactory.getLog(FrontBaseController.class);
	public String basePath = "" + ContextLoader.getCurrentWebApplicationContext();

	/**
	 * 由于底部栏不变，将其代码放在统一地方，便于管理
	 * 
	 * @author
	 */
	public String index(String view_list, HttpServletRequest request) {

		StringBuffer bottombase = new StringBuffer();
		bottombase.append("<div data-am-widget=\"navbar\" class=\"am-navbar  am-navbar-default gm-foot\" style=\"background-color:#9999FF\"  id=\"\">");
		bottombase.append("<ul class=\"am-navbar-nav am-cf am-avg-sm-4\">");
		bottombase.append(
				"<li ><a href=\"/mobile/main\" target=\"_self\" class=\"curr\"> <span class=\"am-icon-home\"></span> <span class=\"am-navbar-label\">首页</span> </a></li>");
		bottombase.append(
				"<li> <a href=\"/mobile/store\" target=\"_self\"  class=\"curr\"> <span class=\"am-icon-th-large\"></span> <span class=\"am-navbar-label\">订单</span> </a> </li>");
		bottombase.append(
				"<li > <a href=\"/mobile/personal\" target=\"_self\" class=\"curr\"> <span class=\"am-icon-user\"></span> <span class=\"am-navbar-label\">个人中心</span> </a> </li>");
		bottombase.append("</ul> </div>");
		request.setAttribute("bottom", bottombase.toString());
		return view_list;

	}

}
